package com.vimi8.ebb.auth.dto;

import io.swagger.annotations.ApiModel;

/**
 * Created by think on 2016/12/16.
 */
@ApiModel("推送消息dto")
public class MessageDTO {


    private String id;//消息主键id
    private String messageTitle;//消息标题
    private String messageContent;//消息内容
    private String messageType;//消息类型
    private String releasePerson;//发信人
    private String createTime;//时间
    private int isRead;//是否已读
    private String releaseId;//发信人id
    private String messageClass;//消息类别
    private String messageRecordId;//查看详情id

    public String getMessageRecordId() {
        return messageRecordId;
    }

    public void setMessageRecordId(String messageRecordId) {
        this.messageRecordId = messageRecordId;
    }

    public String getMessageClass() {
        return messageClass;
    }

    public void setMessageClass(String messageClass) {
        this.messageClass = messageClass;
    }

    public String getReleaseId() {
        return releaseId;
    }

    public void setReleaseId(String releaseId) {
        this.releaseId = releaseId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MessageDTO that = (MessageDTO) o;

        if (isRead != that.isRead) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (messageTitle != null ? !messageTitle.equals(that.messageTitle) : that.messageTitle != null) return false;
        if (messageContent != null ? !messageContent.equals(that.messageContent) : that.messageContent != null)
            return false;
        if (messageType != null ? !messageType.equals(that.messageType) : that.messageType != null) return false;
        if (releasePerson != null ? !releasePerson.equals(that.releasePerson) : that.releasePerson != null)
            return false;
        return createTime != null ? createTime.equals(that.createTime) : that.createTime == null;

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (messageTitle != null ? messageTitle.hashCode() : 0);
        result = 31 * result + (messageContent != null ? messageContent.hashCode() : 0);
        result = 31 * result + (messageType != null ? messageType.hashCode() : 0);
        result = 31 * result + (releasePerson != null ? releasePerson.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + isRead;
        return result;
    }

    @Override
    public String toString() {
        return "MessageDTO{" +
                "id='" + id + '\'' +
                ", messageTitle='" + messageTitle + '\'' +
                ", messageContent='" + messageContent + '\'' +
                ", messageType='" + messageType + '\'' +
                ", releasePerson='" + releasePerson + '\'' +
                ", createTime='" + createTime + '\'' +
                ", isRead=" + isRead +
                '}';
    }

    public MessageDTO() {
    }

    public MessageDTO(String id, String messageTitle, String messageContent, String messageType, String releasePerson, String createTime, int isRead) {

        this.id = id;
        this.messageTitle = messageTitle;
        this.messageContent = messageContent;
        this.messageType = messageType;
        this.releasePerson = releasePerson;
        this.createTime = createTime;
        this.isRead = isRead;
    }

    public String getId() {

        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(String messageTitle) {
        this.messageTitle = messageTitle;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public String getReleasePerson() {
        return releasePerson;
    }

    public void setReleasePerson(String releasePerson) {
        this.releasePerson = releasePerson;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getIsRead() {
        return isRead;
    }

    public void setIsRead(int isRead) {
        this.isRead = isRead;
    }
}
